import java.util.Arrays;

public class Test2 {
    public void majorityElement(int[] nums) {
        Arrays.sort(nums);
        System.out.println(nums[nums.length / 2]);

    }

    public static void main(String[] args) {
        int[] nums = new int[] {1,33,44,33,55,22};
        Test2 s1 = new Test2();
        s1.majorityElement(nums);
    }
}
